Method and apparatus for processing pixels based on segments

ABSTRACT

There is provided a segment-based pixel processing apparatus and method for effective use of memory. The method includes dividing pixel data within a frame into a plurality of segments in the vertical direction; sequentially pre-processing or post-processing pixel data in a segment among the plurality of segments in line units, and then, sequentially pre-processing or post-processing pixel data in a next segment in line units; and repeating pre-processing or post-processing on pixel data in the other segments in line units until reaching a segment of a predetermined number.

[0001] This application claims the priority of Korean Patent ApplicationNo. 2003-10044 on 18 Feb. 2003, in the Korean Intellectual PropertyOffice, the disclosure of which is incorporated herein in its entiretyby reference.

BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention

[0003] The present invention relates to a memory operating system forencoding and decoding data, and particularly, to a segment-based pixelprocessing apparatus and a method for effective memory operation.

[0004] 2. Description of the Related Art

[0005] In general, pre-processing or post-processing is performed on anencoded or decoded image signal in order to improve the quality of animage. Here, the pre-processing or post-processing is performed in pixelunits.

[0006] Referring to FIG. 1, input pixel data is temporarily stored in aframe memory (not shown) in frames units or field units. The pixel datastored in frame or field units is read by a memory for processing. Asillustrated in FIG. 1, in general, the pixel data is pre-processed orpost-processed through several line memories, starting from theuppermost line of the frame to its lowermost line from left to right.That is, pixel data within a frame is sequentially pre-processed orpost-processed in the sequence of row #0→row #1→row #2→row #3→row #4, .. . , etc.

[0007] Referring to FIG. 2, let us assume that the neighbor pixels atn−1^(th) and n+1^(th) rows necessary for pre-processing orpost-processing a pixel at an n^(th) row are present right above andunder the pixel at the n^(th) row. The pixels at the n−1^(th), n^(th),and n+1^(th) rows are input to a processor 240 via a first line memory210, a second line memory 220, and a third line memory 230,respectively.

[0008] For instance, assuming that an image signal having 720 pixels×480lines is present within a frame, a conventional hardware structure forperforming low-pass filtering on 3 pixels×3 pixels requires three linememories capable of storing at least 720 pixels. That is, theconventional hardware structure requires line memory of about 2.2Kbytes.

[0009] Accordingly, as more frames are required to be processed and thenumber of pixels above and under each target pixel increases, aconventional pixel processing method requires more line memory toperform pre-processing or post-processing on the increased number ofpixels.

SUMMARY OF THE INVENTION

[0010] The present invention provides a segment-based pixel processingmethod and apparatus in which a frame is divided into several segmentsand image processing is performed in segment units, thereby reducingloads on memory.

[0011] According to an aspect of the present invention, there isprovided a pixel processing apparatus including a frame storage unit inwhich input pixel data is stored in frame/field units; a line storageunit in which the pixel data, which is stored in the frame storage unitin frame/field units, is stored in line units per vertically-dividedsegment; a processor that pre-processes or post-processes on the pixeldata stored in the line storage unit; and a controller that divides thepixel data within a frame, which is stored in the frame storage unit,into a plurality of segments in the vertical direction, and sequentiallystores the pixel data in the line storage unit in the sequence ofsegments in line units.

[0012] According to another aspect of the present invention, there isprovided a pixel processing method including dividing pixel data withina frame into a plurality of segments in the vertical direction;sequentially pre-processing or post-processing pixel data in a segmentamong the plurality of segments in line units, and then, sequentiallypre-processing or post-processing pixel data in a next segment in lineunits; and repeating pre-processing or post-processing on pixel data inthe other segments in line units until reaching a segment of apredetermined number.

[0013] According to a yet another aspect of the present invention, thereis provided a method of processing pixels in a frame that is dividedinto a plurality of segments, the method including storing pixel data atthe first line of a k^(th) segment in line units; pre-processing orpost-processing the pixel data after storing the pixel data in apredetermined number of line units; separately storing the pre-processedor post-processed pixel data, and then, checking whether pre-processingor post-processing is performed on pixel data at the last row of thek^(th) segment or not; checking whether the k^(th) segment is a segmentof a predetermined number after the pre-processing/post-processing onthe pixel data at the last row; and completing segment-based pixelprocessing when the k^(th) segment is the segment of the predeterminednumber, and repeating the pixel processing until reaching the segment ofthe predetermined number otherwise.

[0014] In another aspect of the present invention, there is provided acomputer-readable recording medium for recording a computer program codefor enabling a computer to provide the services of the above methods ofprocessing pixels.

BRIEF DESCRIPTION OF THE DRAWINGS

[0015]FIG. 1 illustrates a conventional method of processing pixelswithin a frame using a pre-processor or a post-processor;

[0016]FIG. 2 is a block diagram illustrating a structure of an imagesignal processing apparatus performing the conventional pixel processingmethod of FIG. 1;

[0017]FIG. 3 is a block diagram illustrating a structure of asegment-based pixel processing apparatus according to an exemplaryembodiment of the present invention;

[0018]FIG. 4 illustrates a method of processing pixels within a frame,according to an exemplary embodiment of the present invention;

[0019]FIG. 5 illustrates a method of processing pixels within a frame,according to another embodiment of the present invention; and

[0020]FIG. 6 is a flowchart illustrating a method of processing pixelswithin a frame that is divided into a plurality of segments, accordingto an exemplary embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

[0021] Hereinafter, exemplary embodiments of the present invention willbe described in detail with reference the accompanying drawings.

[0022]FIG. 3 is a block diagram illustrating a structure of asegment-based pixel processing apparatus according to an exemplaryembodiment of the present invention.

[0023] Referring to FIG. 3, a frame memory 310 temporarily stores inputpixel data in frame/field units.

[0024] A line memory 320 stores the pixel data, which is stored in theframe memory 310 in frame/field units, in line units per segment in thevertical direction. The size of the line memory 320 is determined bydividing the length of a frame line by K (K is an integer more than 1).For instance, if a frame having 720 pixels×480 lines is divided into sixsegments in the vertical direction, the size of the line memory 320 is120 pixels×480 lines. Also, if low-pass filtering is performed in unitsof 3 pixels×3 pixels, the number of line memory 320 required is three.

[0025] A processor 330 performs low-pass filtering, such aspre-processing or post-processing, on the pixel data that is stored inthe line memory 320 in line units.

[0026] An external memory 340 stores the pixel data that ispre-processed or post-processed by the processor 330.

[0027] A controller 350 reads pixel data, within a frame, which isstored in the frame memory 310, in units of vertically-divided segments,sequentially stores the read pixel data in the line memory 320 in lineunits per segment, and stores the pixel data, which is pre-processed orpost-processed by the processor 330, in the external memory 340.

[0028]FIG. 4 illustrates a method of processing pixels within a frame,according to an exemplary embodiment of the present invention.

[0029] Referring to FIG. 4, a frame is divided into several segments,e.g., a first segment, a second segment, . . . , etc. Pixel data in theframe is pre-processed or post-processed in the sequence of the firstsegment→the second segment→ . . . , etc. Also, the pixel data in eachsegment is sequentially pre-processed or post-processed starting fromthe uppermost line of the frame to the lowermost line as in theconventional pixel processing method shown in FIG. 1. For instance, thepixel data in the first segment is processed in the sequence of pixeldata at row #0→pixel data at row #1→pixel data at row #2→pixel data atrow #3→pixel data at row #4, . . . , etc. Further, the pixel data ateach row is pre-processed or post-processed from left to right.

[0030] Accordingly, a pixel processing method according to the presentinvention can be performed with a line memory of remarkably reducedsize. If low-pass filtering is performed on an image signal having 720pixels×480 lines in units of 3 pixels×3 pixels, a conventional pixelprocessing method requires line memory of at least 2.1 Kbytes. However,assuming that the number of pixels at a line within a segment is 120,the size of line memory required in the pixel processing methodaccording to the present invention can be reduced to one sixth, i.e.,360 bytes, of the size of line memory required in the conventional pixelprocessing method.

[0031] However, when the frame segments do not overlap one another asshown in FIG. 4, artifacts may occur in pixel data at borders of thesegments due to insufficient pixel information duringpre-processing/post-processing. To solve this problem, it is possible todivide a frame into several segments as shown in FIG. 5 such that thesegments overlap one another by a predetermined number of pixels. FIG. 5illustrates a method of processing pixels within a frame, according toanother embodiment of the present invention. In this case, although thesize of the memory increases slightly, it is possible to preventartifacts from occurring at the borders of the segments.

[0032]FIG. 6 is a flowchart illustrating a method of processing pixelswithin a frame that is divided into a plurality of segments, accordingto an exemplary embodiment of the present invention.

[0033] First, let us assume that the pixel data within a frame or fieldis divided into a plurality of segments in the vertical direction andthen, low-pass filtering is performed on the pixel data in units of 3pixels×3 pixels. In this case, first through third line memories capableof storing three line data are required. Also, let us assume that thepixel at the uppermost and lowermost lines of the frame will not beprocessed for convenience.

[0034] Referring to FIG. 6, a total number of rows n is initialized to 0in action 600.

[0035] In action 610, pixel data at an n^(th) row of a k^(th) segment isinput to the frame memory.

[0036] In action 620, the pixel data at the n^(th) row is input to afirst line memory.

[0037] In action 630, it is checked whether pixel data is stored in allof the three line memories in line units. For instance, it is checkedwhether n of the n^(th) row is 2. In action 680, if n is not determinedto be 2 in action 630, the pixel data stored in the three line memoriesis shifted to their next memories, respectively. That is, the pixel datastored in the first line memory is shifted to the second line memory andthe pixel data originally stored in the second line memory is shifted tothe third line memory.

[0038] In action 640, if n of the n^(th) row is determined to be 2 inaction 630, low-pass filtering, such as pre-processing orpost-processing, is performed on the pixel data at the n−1^(th) row.

[0039] In action 650, the pre-processed or post-processed pixel data isstored in an external memory.

[0040] In action 660, it is checked whether pixel data stored at thelast row of a k^(th) segment was pre-processed/post-processed. If it isdetermined in action 660 that pixel data stored at the last row of ak^(th) segment is not pre-processed or post-processed, the pixelprocessing method returns to action 680 and actions 680 and 610 through660 are performed again on pixel data at a next row of the k^(th)segment.

[0041] In action 670, if it is determined in action 660 that pixel datastored at the last row was pre-processed or post-processed, it ischecked whether the k^(th) segment corresponds to the last segment K ofthe frame or not (K is an integer more than 1).

[0042] If it is determined in action 670 that the k^(th) segmentcorresponds to the last segment K, pixel processing in segment units iscompleted. However, if the k^(th) segment does not correspond to thelast segment K, the pixel processing method returns to action 610 andpixel processing is performed on pixel data at a k+1^(th) segment again.In this way, pre-processing or post-processing is sequentially performedin segment units.

[0043] In conclusion, a frame is divided into segments of apredetermined number and then, pixel data within the frame issequentially pre-processed or post-processed in the sequence of a firstsegment, a second segment, . . . , etc.

[0044] While this invention has been particularly shown and describedwith reference to exemplary embodiments thereof, it will be understoodby those skilled in the art that various changes in form and details maybe made therein without departing from the spirit and scope of theinvention as defined by the appended claims.

[0045] The present invention can be embodied as a computer readable codein a computer readable medium. Here, the computer readable medium may beany recording apparatus capable of storing data that is read by acomputer system, e.g., a read-only memory (ROM), a random access memory(RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, anoptical data storage device, and so on. Also, the computer readablemedium may be a carrier wave that transmits data via the Internet, forexample. The computer readable recording medium can be distributed amongcomputer systems that are interconnected through a network, and thepresent invention may be stored and implemented as a computer readablecode in the distributed system.

[0046] As described above, in a pixel processing apparatus and methodaccording to the present invention, a frame is divided into severalsegments and pixels within the frame are processed in segment unitsusing a pre-processor or a post-processor, thereby remarkably reducingloads on memory.

What is claimed is:
 1. A pixel processing apparatus, comprising: a framestorage unit in which input pixel data is stored in frame/field units; aline storage unit in which the input pixel data, which is stored in theframe storage unit in frame/field units, is stored in line units pervertically-divided segment; a processor that pre-processes orpost-processes the input pixel data stored in the line storage unit; anda controller that divides the input pixel data within a frame, which isstored in the frame storage unit, into a plurality of segments in avertical direction, and sequentially stores the input pixel data in theline storage unit in a sequence of segments in line units.
 2. Theapparatus of claim 1, wherein a size of the line storage unit isdetermined by dividing a line length of a frame by K, wherein K is aninteger greater than
 1. 3. The apparatus of claim 1, wherein thecontroller sequentially stores input pixel data in a segment among theplurality of segments in the line storage unit in line units,sequentially stores input pixel data in a next segment in the linestorage unit in line units, and repeats storing of pixel data in othersegments until reaching a segment of a predetermined number.
 4. A pixelprocessing method comprising: dividing pixel data within a frame into aplurality of segments in a vertical direction; sequentiallypre-processing or post-processing the pixel data in a segment among theplurality of segments in line units and then, sequentiallypre-processing or post-processing the pixel data in a next segment inline units; and repeating pre-processing or post-processing on the pixeldata in other segments in line units until reaching a segment of apredetermined number.
 5. The method of claim 4, wherein each of theplurality of segments within the frame overlaps another of the pluralityof segments by a predetermined number of pixels.
 6. A method ofprocessing pixels in a frame that is divided into a plurality ofsegments, the method comprising: storing pixel data at a first line of ak^(th) segment in line units; pre-processing or post-processing thepixel data after storing the pixel data in a predetermined number ofline units and outputting corresponding pre-processed or post-processedpixel data; separately storing the pre-processed or post-processed pixeldata and then, checking whether pre-processing/post-processing isperformed on the pixel data at a last row of the k^(th) segment or not;checking whether the k^(th) segment is a segment of a predeterminednumber after the pre-processing/post-processing on the pixel data at thelast row; and completing segment-based pixel processing when the k^(th)segment is the segment of the predetermined number, and repeating thepixel processing until reaching the segment of the predetermined numberwhen the k^(th) segment is not the segment of the predetermined number.7. A computer-readable recording medium for recording a computer programcode for enabling a computer to provide a service of processing pixels,the service comprising the steps of: dividing pixel data within a frameinto a plurality of segments in a vertical direction; sequentiallypre-processing or post-processing the pixel data in a segment among theplurality of segments in line units and then, sequentiallypre-processing or post-processing the pixel data in a next segment inline units; and repeating pre-processing or post-processing on the pixeldata in other segments in line units until reaching a segment of apredetermined number.
 8. The computer-readable recording medium of claim7, wherein each of the plurality of segments within the frame overlapsanother of the plurality of segments by a predetermined number ofpixels.
 9. A computer-readable recording medium for recording a computerprogram code for enabling a computer to provide a service of processingpixels, the service comprising the steps of: storing pixel data at afirst line of a k^(th) segment in line units; pre-processing orpost-processing the pixel data after storing the pixel data in apredetermined number of line units and outputting correspondingpre-processed or post-processed pixel data; separately storing thepre-processed or post-processed pixel data and then, checking whetherpre-processing/post-processing is performed on the pixel data at a lastrow of the k^(th) segment or not; checking whether the k^(th) segment isa segment of a predetermined number after thepre-processing/post-processing on the pixel data at the last row; andcompleting segment-based pixel processing when the k^(th) segment is thesegment of the predetermined number, and repeating the pixel processinguntil reaching the segment of the predetermined number when the k^(th)segment is not the segment of the predetermined number.